<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>异步获取数据</title>
</head>

<body>
    <div id="watch-example">
        <p>{{ response }}</p>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/axios@0.12.0/dist/axios.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/lodash@4.13.1/lodash.min.js"></script>
    <script src="https://cdn.bootcss.com/vue/2.6.11/vue.js"></script>
    <script>
        var watchExampleVM = new Vue({
            el: '#watch-example',
            data: {
                response: '',

            },
            created: function () {
                this.getUsersList()
            },
            methods: {
                getUsersList: function () {
                    var that = this
                    axios.get('http://hn216.api.yesapi.cn/?s=App.Table.Get&model_name=student&id=1&app_key=5C559705EEC307BDDE4D087D3BE8C926&sign=8B425091F005774718DC4C634BE7971C').then(function (response) {
                        console.log(response)
                    }).catch(function (error) {
                        console.log(error);
                    });
                }
            }
        })
    </script>
</body>

</html>
